<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    function person(name, age) {
        this.name = name;
        this.age = age;
        this.sayHi = function() {
            console.log(this.name+'说话');
            
        }
    }

    var p1 = new person('zs',18);
    console.log(p1);
    var p2 = new person('ls',28);
    console.log(p2);
    p1.sayHi();
    p2.sayHi();

    var obj = new Object();
    obj.name = 'ww';
    obj.age = 20;
    console.log(obj);
    
    
    
    </script>
</body>
</html>